package indi.cyh.entity;


import com.alibaba.fastjson2.annotation.JSONField;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author CYH
 * @className InterfaceRequestLog
 * @description
 * @date 2024-12-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table("FILE_CENTER.INTERFACE_REQUEST_LOG")
@Schema(description = "接口日志")
public class InterfaceRequestLog implements Serializable {


    private static final long serialVersionUID = 746206078642969580L;


    @Id(value = "ID", type = IdType.NONE)
    @JSONField(name = "id", alternateNames = {"id", "ID"})
    private String id;

    /**
     * 调用人
     */
    @Schema(description = "调用人", example = "")
    @JSONField(name = "loginName", alternateNames = {"loginName", "LOGIN_NAME"})
    private String loginName;

    /**
     * 接口名称
     */
    @Schema(description = "接口名称", example = "")
    @JSONField(name = "interfaceName", alternateNames = {"interfaceName", "INTERFACE_NAME"})
    private String interfaceName;

    /**
     * 调用参数
     */
    @Schema(description = "调用参数", example = "")
    @JSONField(name = "requestParam", alternateNames = {"requestParam", "REQUEST_PARAM"})
    private String requestParam;

    /**
     * 调用结果
     */
    @Schema(description = "调用结果", example = "")
    @JSONField(name = "requestRes", alternateNames = {"requestRes", "REQUEST_RES"})
    private String requestRes;

    /**
     * 开始调用时间
     */
    @Schema(description = "开始调用时间", example = "")
    @JSONField(name = "startTime", alternateNames = {"startTime", "START_TIME"}, format = "yyyy-MM-dd HH:mm:ss")
    private java.sql.Timestamp startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间", example = "")
    @JSONField(name = "endTime", alternateNames = {"endTime", "END_TIME"}, format = "yyyy-MM-dd HH:mm:ss")
    private java.sql.Timestamp endTime;

    /**
     * 调用装态(0调用中、1调用结束、2调用异常)
     */
    @Schema(description = "调用装态(0调用中、1调用结束、2调用异常)", example = "")
    @JSONField(name = "status", alternateNames = {"status", "STATUS"})
    private long status;

    /**
     * 运行耗时(秒)
     */
    @Schema(description = "运行耗时(秒)", example = "")
    @JSONField(name = "runningTime", alternateNames = {"runningTime", "RUNNING_TIME"})
    private long runningTime;

    /**
     * 异常信息
     */
    @Schema(description = "异常信息", example = "")
    @JSONField(name = "exceptionInfo", alternateNames = {"exceptionInfo", "EXCEPTION_INFO"})
    private String exceptionInfo;

    /**
     * 日志标记
     */
    @Schema(description = "日志标记", example = "")
    @JSONField(name = "code", alternateNames = {"code", "CODE"})
    private String code;

    /**
     * 调用ip
     */
    @Schema(description = "调用ip", example = "")
    @JSONField(name = "requestIp", alternateNames = {"requestIp", "REQUEST_IP"})
    private String requestIp;

}
